package com.foreknow.demo10;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ExceptionDemo4 {
    public void m1() throws Exception {

    }

    public void m2() {
        //创建对象BufferedReader
        try {
            BufferedReader bufferedReader = new BufferedReader(new FileReader(""));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    public void m3() {
        try {
            Class.forName("");
            DriverManager.getConnection("","","");
        } catch (SQLException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }


    public static void main(String[] args) {
        ExceptionDemo4 demo4 = new ExceptionDemo4();
        try {
            demo4.m1();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("11111111111111111111");

//        try {
//            int[] array = {1,2,3};
//            for(int i = 0;i<=array.length;i++) {
//                System.out.println(array[i]);
//            }
//        }catch(Exception e) {
//            System.out.println(e.getMessage());
//        }
//        System.out.println("1111111111111111111");
    }
}
